<?php
require_once 'const/DBConst.php';
?>
<div id="locate">&nbsp;</div>
<div id="container">
    <div class="left"> 
        <div id="proList">
            <h2><a href="/product/new" title="查看更多商品">最新上架</a></h2>
            <div>
                <?php foreach ($this->newProducts as $product): ?>
                    <div class="mallList">
                        <div class="pdetail">
                            <p class="img">
                                <a href="<?php echo "/product/view?id=" . $product["ID"] ?>" target="_blank" title="<?php echo $product[C_NAME] ?>">
                                    <img height="80" alt="查看 <?php echo $product[C_NAME] ?>" src="<?php echo "/upload/" . $product["ID"] ?>" onerror="this.src='/images/nopic.gif'" border="0" /></a></p>
                            <p class="name">
                                <a href="<?php echo "/product/view?id=" . $product["ID"] ?>" target="_blank" title="<?php echo $product[C_NAME] ?>"><?php echo $product[C_NAME] ?></a>
                            </p>
                            <p class="pricelabel">售　价:<font color="#FF0000"> &yen; </font><?php echo $product[C_PRICE] ?></p>
                            <p class="pricelabel">热  度:<?php echo $product[C_BUY_TIMES] ?></p>
                        </div>
                    </div>
                <?php endforeach; ?>
                </div>
                <div class="clear"></div>
            </div>
            <div id="proList" style="margin-top: 20px">
                <h2><a href="/product/hot" title="查看更多商品">最热商品</a></h2>
                <div>
                <?php foreach ($this->hotProducts as $product): ?>
                        <div class="mallList">
                            <div class="pdetail">
                                <p class="img">
                                    <a href="<?php echo "/product/view?id=" . $product["ID"] ?>" target="_blank" title="<?php echo $product[C_NAME] ?>">
                                        <img height="80" alt="查看 <?php echo $product[C_NAME] ?>" src="<?php echo "/upload/" . $product["ID"] ?>" onerror="this.src='/images/nopic.gif'" border="0" /></a></p>
                                <p class="name">
                                    <a href="<?php echo "/product/view?id=" . $product["ID"] ?>" target="_blank" title="<?php echo $product[C_NAME] ?>"><?php echo $product[C_NAME] ?></a>
                                </p>
                                <p class="pricelabel">售　价:<font color="#FF0000"> &yen; </font><?php echo $product[C_PRICE] ?></p>
                                <p class="pricelabel">热  度:<?php echo $product[C_BUY_TIMES] ?></p>
                            </div>
                        </div>
                <?php endforeach; ?>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="h5"></div>
                <div class="onlineInner">
                </div><div class="h5"></div>
            </div>
            <div class="right">
                <div class="balls">
                    <div class="ballInfo">
                        <div class="ballList">
                            <div style="" id="ball1">
                        <?php foreach ($this->types as $type): ?>
                            <div><h5><a href="<?php echo "/product/type?id=" . $type["ID"] ?>"><?php echo $type[C_NAME] ?></a></h5></div>
                        <?php endforeach; ?>

                    </div>
                </div>
            </div>
            <div class="ballBtm">
                <h2>Shopping with happy!</h2>
            </div>
        </div>
        <div class="left_ad"></div>
        <div class="left_new">
            <div class="h5"></div>
            <div class="right left_ad">
            </div>
        </div>
    </div>
    <div id="online">

        <div class="clear"></div>
    </div>
</div>